package BehaviorModel.strategyModel.discountCalculation;

public class PercentageDiscount implements DiscountStrategy{
    /**
     * 百分比折扣
     */
    private final double percentage;

    public PercentageDiscount(double percentage) {
        this.percentage = percentage;
    }
    @Override
    public double calculateDiscount(double price) {
        return price*(1-percentage/100);
    }
}
